package com.dzsw.bean;

public class WriteConfig {

    private String tempFileName;

    private Long addr;

    private Long offset;

    private Integer length;

    public WriteConfig(String tempFileName, Long addr, Long offset, Integer length) {
        this.tempFileName = tempFileName;
        this.addr = addr;
        this.offset = offset;
        this.length = length;
    }

    public Long getStartPosition() {
        return addr + offset;
    }

    public Long getEndPosition() {
        return addr + offset + length;
    }

    public String getTempFileName() {
        return tempFileName;
    }

    public void setTempFileName(String tempFileName) {
        this.tempFileName = tempFileName;
    }

    public Long getAddr() {
        return addr;
    }

    public void setAddr(Long addr) {
        this.addr = addr;
    }

    public Long getOffset() {
        return offset;
    }

    public void setOffset(Long offset) {
        this.offset = offset;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }
}
